package com.woniu.user.app.apiImpl;

import cn.hutool.core.bean.BeanUtil;
import com.woniu.crowd.client.CrowdQueryClient;
import com.woniu.crowd.client.result.CrowdProductResultInfo;
import com.woniu.result.Result;
import com.woniu.user.client.UserCrowdQueryClient;
import com.woniu.user.client.result.UserCrowdProductResultInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Slf4j
public class UserCrowdQueryApiImpl implements UserCrowdQueryClient {

    @Resource
    private CrowdQueryClient crowdQueryClient;
    @Override
    public Result listCrowdByUserId(Integer userId) {
        Result<List<CrowdProductResultInfo>> listResult = crowdQueryClient.listCrowdByUserId(userId);


        return listResult;
    }
}
